<?php

// +----------------------------------------------------------------------
// | H1CMS © OpenSource CMS
// +----------------------------------------------------------------------
// | Copyright (c) 2014-2016 http://www.h1cms.com All rights reserved.
// | Copyright (c) 2014-2016 嘉兴领格信息技术有限公司，并保留所有权利。
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Allen <allen@lg4.cn>
// +----------------------------------------------------------------------

namespace Lg\Traits;

/**
 * Description of ArrayTrait
 *
 * @author getssl
 */
trait ArrayTrait {

    public function offsetExists($key) {
        return array_key_exists($key, $this->data);
    }

    public function offsetGet($key) {
        return $this->data[$key];
    }

    public function offsetSet($key, $value) {
        $this->data[$key] = $value;
    }

    public function offsetUnset($key) {
        unset($this->data[$key]);
    }

}
